﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="admin_subject.aspx.cs" Inherits="skvote.admin_subject" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<%skvote.function.header(Response);%>
<title>【单考投票系统】后台管理中心</title>

</head>
<body>
<form id="form1" runat="server">
<table border="0" cellpadding="1" cellspacing="2" width="100%" id="table1" bgcolor="#E1F0FF">
  <tr>
    <td>
	  <table width="100%" id="table2" cellspacing="1">
	    <tr>
          <td id="TableTitle1">管理投票主题 -&gt;
          <%=SearchSubject(k.Text.Trim()) %>
	      </td>
     </tr>
	 </table>
      </td>
  </tr>
  <tr>
   
    <td>
      
       <asp:DataGrid ID="datagrid1" runat="server" AutoGenerateColumns="False" 
           CellSpacing="1" AllowPaging="true" PagerStyle-HorizontalAlign="Right" 
            PagerStyle-Mode="NumericPages" BorderColor="#BFDFFF" BorderWidth="1px" 
           onitemcreated="datagrid1_ItemCreated" Width="100%" ShowFooter="True" 
            GridLines="Both" PageSize="20" 
            onpageindexchanged="datagrid1_PageIndexChanged">
            
<PagerStyle Mode="NumericPages" HorizontalAlign="Left" Visible="false"></PagerStyle>
      
            
      <Columns>      
      <asp:TemplateColumn FooterStyle-CssClass="DataGrid1_Header_Footer" HeaderStyle-CssClass="DataGrid1_Header_Footer">
       <HeaderStyle Width="5%" HorizontalAlign="Center" />
       <HeaderTemplate>         
         ID
       </HeaderTemplate>
       <FooterStyle Width="5%" HorizontalAlign="Center" />
       <FooterTemplate>
        ID
       </FooterTemplate>
       <ItemStyle Width="5%" HorizontalAlign="Center"  />       
       <ItemTemplate>
        <%# DataBinder.Eval(Container.DataItem,"ID") %>        
       </ItemTemplate>       
      </asp:TemplateColumn>
      
      <asp:TemplateColumn FooterStyle-CssClass="DataGrid1_Header_Footer" HeaderStyle-CssClass="DataGrid1_Header_Footer">
       <HeaderStyle Width="5%" HorizontalAlign="Center" />
       <HeaderTemplate>
        <asp:CheckBox ID="choose" runat="server" Text="" AutoPostBack="true"/>
       </HeaderTemplate>
       <FooterStyle Width="5%" HorizontalAlign="Center"/>
       <FooterTemplate>
        <asp:CheckBox ID="chooseF" runat="server" Text="" AutoPostBack="true" />
       </FooterTemplate>
       <ItemStyle Width="5%" HorizontalAlign="Center" />
       <ItemTemplate>
        <asp:CheckBox ID="IDchk" runat="server" Text="" ToolTip='<%# DataBinder.Eval(Container.DataItem,"ID") %>' />
       </ItemTemplate>       
      </asp:TemplateColumn>      
      
      <asp:TemplateColumn FooterStyle-CssClass="DataGrid1_Header_Footer" HeaderStyle-CssClass="DataGrid1_Header_Footer">
       <HeaderStyle HorizontalAlign="Center"  />
       <HeaderTemplate>
        投票主题名称
       </HeaderTemplate>
       <FooterStyle HorizontalAlign="Center" />
       <FooterTemplate>
        投票主题名称
       </FooterTemplate>
       <ItemStyle HorizontalAlign="Center" />
       <ItemTemplate>
        <a href='admin_subject_modify.aspx?id=<%#DataBinder.Eval(Container.DataItem,"ID") %>&subject=<%#DataBinder.Eval(Container.DataItem,"subject") %>'><%# DataBinder.Eval(Container.DataItem,"subject") %></a>        
       </ItemTemplate>
      </asp:TemplateColumn> 
      <asp:TemplateColumn FooterStyle-CssClass="DataGrid1_Header_Footer" HeaderStyle-CssClass="DataGrid1_Header_Footer">
       <HeaderStyle HorizontalAlign="Center" Width="18%" />
       <HeaderTemplate>
        投票到期时间
       </HeaderTemplate>
       <FooterStyle HorizontalAlign="Center" Width="18%" />
       <FooterTemplate>
        投票到期时间
       </FooterTemplate>
       <ItemStyle HorizontalAlign="Center" Width="5%" />
       <ItemTemplate>
        <%#DataBinder.Eval(Container.DataItem,"qx") %>
       </ItemTemplate>
      </asp:TemplateColumn>
      <asp:TemplateColumn FooterStyle-CssClass="DataGrid1_Header_Footer" HeaderStyle-CssClass="DataGrid1_Header_Footer">
       <HeaderStyle Width="10%" HorizontalAlign="Center" />
       <HeaderTemplate>
        调用代码
       </HeaderTemplate>
       <FooterStyle Width="10%" HorizontalAlign="Center" />
       <FooterTemplate>
        调用代码
       </FooterTemplate>
       <ItemStyle HorizontalAlign="Center" Width="10%" />
       <ItemTemplate>
        <a href="#" onclick='javascript:window.open("vcode.aspx?id=<%#DataBinder.Eval(Container.DataItem,"Id") %>","","height=60,width=300,top=300,left=350,resizable=no,scrollbars=no,status=no,toolbar=no,menubar=no,location=no")'>查看</a>
       </ItemTemplate>
      </asp:TemplateColumn>
      <asp:TemplateColumn FooterStyle-CssClass="DataGrid1_Header_Footer" HeaderStyle-CssClass="DataGrid1_Header_Footer">
       <HeaderStyle Width="10%" HorizontalAlign="Center" />
       <HeaderTemplate>
        投票结果
       </HeaderTemplate>
       <FooterStyle Width="10%" HorizontalAlign="Center" />
       <FooterTemplate>
        投票结果
       </FooterTemplate>
       <ItemStyle Width="10%" HorizontalAlign="Center" />
       <ItemTemplate>
        <a href='view.aspx?sid=<%#DataBinder.Eval(Container.DataItem,"Id")%>' target="_blank">查看</a>
       </ItemTemplate>        
      </asp:TemplateColumn>
      <asp:TemplateColumn FooterStyle-CssClass="DataGrid1_Header_Footer" HeaderStyle-CssClass="DataGrid1_Header_Footer">
       <HeaderStyle Width="5%" HorizontalAlign="Center"/>
       <HeaderTemplate>
        状态
       </HeaderTemplate>
       <FooterStyle Width="5%" HorizontalAlign="Center" />
       <FooterTemplate>
        状态
       </FooterTemplate>
       <ItemStyle Width="5%" HorizontalAlign="Center" />
       <ItemTemplate>
        <%# Invalid((DateTime)DataBinder.Eval(Container.DataItem,"qx")) %>
       </ItemTemplate>
      </asp:TemplateColumn>
      <asp:TemplateColumn FooterStyle-CssClass="DataGrid1_Header_Footer" HeaderStyle-CssClass="DataGrid1_Header_Footer">
       <HeaderStyle Width="20%" HorizontalAlign="Center" />
       <HeaderTemplate>
        单项操作
       </HeaderTemplate>
       <FooterStyle width="20%" HorizontalAlign="Center"/>
       <FooterTemplate>
        单项操作
       </FooterTemplate>
       <ItemStyle Width="20%" HorizontalAlign="Center" />
       <ItemTemplate>
        <a href='admin_subject.aspx?act=delps&id=<%#DataBinder.Eval(Container.DataItem,"Id") %>'>清空票数</a>&nbsp;
        <a href='admin_user.aspx?sid=<%#DataBinder.Eval(Container.DataItem,"Id") %>'>查看用户信息</a>&nbsp;
        <a href='admin_subject.aspx?act=del&id=<%#DataBinder.Eval(Container.DataItem,"Id") %>'>删除</a>
       </ItemTemplate>
      </asp:TemplateColumn>     
      </Columns>      
      </asp:DataGrid>
           
    </td> 
  </tr>
  <tr>
   <td colspan="8">
    <asp:Button runat="server" ID="DelChoosed" Text="删除所选标题" CssClass="btn" OnClientClick="return confirm('确定删除?');" 
           onclick="DelChoosed_Click"/>              |
    <asp:TextBox runat="server" ID="k" TextMode="SingleLine"></asp:TextBox>     
    <asp:Button runat="server" ID="Search" Text="搜索投票主题" CssClass="btn" 
           onclick="Search_Click" />
   </td>
  </tr>
  <tr>
   <td colspan="8" align="left">
    总共&nbsp;<asp:Label runat="server" Text="" ID="records"></asp:Label>&nbsp;条记录&nbsp;
    共&nbsp;<asp:Label ID="pages" Text="" runat="server"></asp:Label>&nbsp;页
    第&nbsp;<asp:Label ID="curpage" Text="" runat="server"></asp:Label>&nbsp;页
    <asp:LinkButton ID="First" Text="首页" runat="server" CommandArgument="FIRST" 
           onclick="First_Click"></asp:LinkButton>
    <asp:LinkButton ID="Prev" Text="上一页" runat="server" CommandArgument="PREV"></asp:LinkButton>
    <asp:LinkButton ID="Next" Text="下一页" runat="server" CommandArgument="NEXT" 
           onclick="First_Click"></asp:LinkButton>
    <asp:LinkButton ID="Last" Text="尾页" runat="server" CommandArgument="LAST" 
           onclick="First_Click"></asp:LinkButton>
   </td>
  </tr>
</table>
</form>
</body>
</html>